import openpyxl
# from openpyxl import load_workbook,Workbook# 打开文件 文件名为01.xlsx
# workbook = load_workbook(filename="../files/API.xlsx")
# worksheet = workbook['Sheet1']
# # 读取A2单元格的值 row:行，column:列
# value = worksheet.cell(row=2,column=1).valueprint(value)
from openpyxl import load_workbook
# 加载工作簿
wb2 = load_workbook('../files/API.xlsx')
# 获取所有sheet页名字
print(wb2.get_sheet_names())
print(wb2.sheetnames)
# 获取sheet页
ws2 = wb2.get_sheet_by_name('Sheet1')
#获取单元格信息
cellIns1 = ws2.cell(1,1)
cellIns2 = ws2['A1']

# 获取sheet页
# ws2 = wb2['Sheet1']
# ws3 = wb2.get_sheet_by_name('Sheet')
# # 打印sheet页的颜色属性值
# print('color:',ws2.sheet_properties.tabColor)
# wb2.close()

